1. Technical Field of the Invention
The present invention relates generally to digital color image sensors, and specifically to image processing of sensor values.
2. Description of Related Art
Electronic image sensors are predominately of two types: CCDs (Charge Coupled Devices) and CMOS—APS (Complimentary Metal Oxide Semiconductor—Active Pixel Sensors). Both types of sensors typically contain an array of photo-detectors, arranged in a pattern, that sample color within an image. Each photo-detector corresponds to a pixel of an image and measures the intensity of light of the pixel within one or more ranges of wavelengths, corresponding to one or more perceived colors.
In addition, both types of sensors may include a color filter array (CFA), such as the CFA described in U.S. Pat. No. 3,971,065 to Bayer (hereinafter referred to as Bayer), which is hereby incorporated by reference. With the Bayer CFA, each pixel sees only one wavelength range, corresponding to the perceived color red, green or blue. To obtain the sensor values for all three primary colors at a single pixel location, it is necessary to interpolate the color sensor values from adjacent pixels. This process of interpolation is called demosaicing. There are a number of demosaicing methods known in the art today. By way of example, but not limitation, various demosaicing methods have included pixel replication, bilinear interpolation and median interpolation.
In order for the demosaicing process to produce a visually pleasing image, all of the sensor values produced by the digital image sensor must be accurate. However, despite advances in the manufacturing process, digital image sensors often contain a few defective pixels as a result of fabrication errors, such as impurity contamination. Defective pixels respond inappropriately to the incident light, and therefore produce inaccurate sensor values. A defective pixel can usually be identified by examining the difference between sensor responses of the defective pixel and its immediate pixel neighbors to the same illumination. Once identified, the sensor value of a defective pixel can be replaced with an estimated sensor value from pixels in the neighborhood of the defective pixel.
The process of detecting and correcting defective pixels is referred to as bad pixel correction (BPC). There are a number of algorithms for BPC available in the market today. For example, one BPC method for color image sensors proposed by Maynants & Diercickx in “A circuit for the correction of pixel defects in image sensor”, Proceedings of the 24th European Solid-State Circuits Conference, The Hague, Netherlands, Sep. 22–24, 1998, p. 312–315, which is hereby incorporated by reference, detects bad pixels by comparing the sensor value of a current pixel to sensor value predictions from neighboring pixels of the same color on the same row. However, the Maynants & Diercickx BPC method does not compare sensor values that are spatially adjacent to the current pixel, and therefore has the drawback of erasing local ridges in the image, where sensor values peak or recess. In addition, the Maynants & Diercickx BPC method does not compare sensor values vertically, and therefore has the additional drawback of erasing fine vertical lines.
Another BPC method for color image sensors proposed by Tan & Acharya in “A robust sequential approach for the detection of defective pixels in an image sensor” Proceedings of the 1999 International Conference on Acoustics, Speech and Signal Processing, Phoenix, Ariz., Mar. 15–19, 1999, p. 2239–2242, which is hereby incorporated by reference, builds a bad pixel map by accumulating the result of bad pixel detection over a sequence of images based on a minimum difference between a given pixel and its immediate neighbors of the same color However, the Tan & Acharya method requires the storage of the bad pixel map in non-volatile memory. Incorporating non-volatile memory into an image sensor or an image processor chip is a significant expense. Furthermore, the Tan & Acharya method also does not compare spatially adjacent sensor values when creating the bad pixel map.
Therefore, what is needed is a bad pixel correction algorithm that effectively and accurately detects and corrects defective pixels using spatially adjacent sensor values to identify defective pixels near edges and in regions of texture. Furthermore, bad pixel correction (BPC) and demosaicing have traditionally been performed in two separate stages, either in software or in a digital circuit implemented in hardware. Each stage adds to the expense and complexity of processing sensor values for final output on a display device. Therefore, what is further needed is a method that combines an accurate BPC algorithm with demosaicing in a single stage.